﻿@{
    ViewBag.Title = "GenerateStatistics";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Product Statistics</h2>

<div id="divResults">

@Ajax.ActionLink("Get Highest Rated Products", "GetHighestRatedProduct", 
               new AjaxOptions
               {
                 HttpMethod = "Get",
                 UpdateTargetId = "divResults",
                 InsertionMode = InsertionMode.Replace  
               })

@Ajax.ActionLink("Get Most purchased Products", "GetMostPurchasedProducts", 
               new AjaxOptions
               {
                 HttpMethod = "Get",
                 UpdateTargetId = "divResults",
                 InsertionMode = InsertionMode.Replace  
               })

@Ajax.ActionLink("Get Products with Most faults", "GetMostFaultsForProduct", 
               new AjaxOptions
               {
                 HttpMethod = "Get",
                 UpdateTargetId = "divResults",
                 InsertionMode = InsertionMode.Replace  
               })

@Ajax.ActionLink("Get Products with least faults", "GetLeastFaultsForProduct", 
               new AjaxOptions
               {
                 HttpMethod = "Get",
                 UpdateTargetId = "divResults",
                 InsertionMode = InsertionMode.Replace  
               })
</div>

<p>
@Html.ActionLink("Print all reports and send as pdf", "PrintStatistics")</p>